
import './App.scss';
import Index from './pages/index';
import 'tdesign-mobile-react/es/style/index.css';
import Login from './pages/login/index';
import { verity_login_status } from './auth/verity';
import { useState } from 'react';
import { Toast } from 'tdesign-mobile-react';
import Cookies from 'js-cookie';

function App() {
  const [login, setLogin] = useState(true);

  /*
  verity_login_status((r) => {
    if (r) {
      setLogin(r);
    } else {
      let utk = Cookies.get("utk");
      if (utk === null || utk === '') {
        Toast.warning({
          message: "登录已过期，请重新登录"
        })
      }
    }
  });
  */
 
  if (login) {
    return (<>
      <Index></Index>
    </>)
  } else {
    return (<>
      <Login></Login>
    </>)
  }
}

export default App
